package uutalk.netcloud.talk.model.bean;

import android.support.annotation.NonNull;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Generated;

/**
 * Created by Administrator on 2017/12/15.
 * 好友信息
 */
@Entity
public class FriendInfoBean implements Comparable<FriendInfoBean>{

    @Id
    String friend_id;
    String friend_picture;
    String friend_name;
    String friendIndex;
    String isSelect;
    String friend_status;


    @Generated(hash = 1886877278)
    public FriendInfoBean(String friend_id, String friend_picture,
            String friend_name, String friendIndex, String isSelect,
            String friend_status) {
        this.friend_id = friend_id;
        this.friend_picture = friend_picture;
        this.friend_name = friend_name;
        this.friendIndex = friendIndex;
        this.isSelect = isSelect;
        this.friend_status = friend_status;
    }

    @Generated(hash = 1719615388)
    public FriendInfoBean() {
    }

    public String getFriend_id() {
        return friend_id;
    }

    public void setFriend_id(String friend_id) {
        this.friend_id = friend_id;
    }

    public String getFriend_picture() {
        return friend_picture;
    }

    public void setFriend_picture(String friend_picture) {
        this.friend_picture = friend_picture;
    }

    public String getFriend_name() {
        return friend_name;
    }

    public void setFriend_name(String friend_name) {
        this.friend_name = friend_name;
    }


    public String getFriendIndex() {
        return friendIndex;
    }

    public void setFriendIndex(String friendIndex) {
        this.friendIndex = friendIndex;
    }

    public String getIsSelect() {
        return isSelect;
    }

    public void setIsSelect(String isSelect) {
        this.isSelect = isSelect;
    }

    public String getFriend_status() {
        return friend_status;
    }

    public void setFriend_status(String friend_status) {
        this.friend_status = friend_status;
    }

    @Override
    public int compareTo(@NonNull FriendInfoBean friendInfoBean) {
        if("1".equals(this.getFriend_status())){
            return -1;
        } else {
            if("1".equals(friendInfoBean.getFriend_status())){
                return 1;
            } else if("1".equals(this.getFriend_status())){
                return -1;
            } else if("1".equals(friendInfoBean.getFriend_status())){
                return 1;
            } else {
                return 0;
            }
        }
    }
}
